﻿@inherits System.Web.Mvc.WebViewPage<Pikapika.Models.NovelChapter>

@{
	ViewBag.Title = "NovelChapter - CreateBatch";
	
}


	@using (Html.BeginForm()) {
		@Html.ValidationSummary(true)

		<fieldset>
			<legend>Fields</legend>
			
			<div class="editor-label">
				Volume ID
			</div>
			<div class="editor-field">
				@ViewBag.NovelVolumeId
                @Html.Hidden("NovelVolumeId", (int)ViewBag.NovelVolumeId)
			</div>
			
			<div class="editor-label">
				PostUserName
			</div>
			<div class="editor-field">
                @Html.TextBox("PostUserName", (string)ViewBag.PostUserName)
			</div>
			
			<div class="editor-label">
				Volume content
			</div>
			<div class="editor-field">
				<textarea id="volume-content"></textarea>
				<input type="checkbox" checked="checked" id="preprocess-text" name="preprocess-text" />
				<label for="preprocess-text">Preprocess content</label>
			</div>

			<div class="editor-label">
				Split pattern
			</div>
			<div class="editor-field">
				<input type="text" id="split-pattern" />
				<select id="predefined-patterns">
					<option selected="selected"> -- Predefined -- </option>
					<option>(\d+\s+.*)</option>
					<option>\#.*</option>
				</select>
			</div>

			<p>
				<button id="process-button">Process</button>
				<div id="process-error-message"></div>
			</p>
			
			<div class="editor-label">
				Result
			</div>
			<div class="editor-field">
				<select id="result-chapter-list" size="10">
				</select>
				<input type="text" id="result-chapter-preview-name" />
				<textarea id="result-chapter-preview-content"></textarea>
			</div>
			<div class="clear"></div>
			<p>
				<input type="button" id="submit-button" value="Create" />
			</p>
			<p id="submit-error-message"></p>
		</fieldset>

	}

	<div>
		@Html.ActionLink("Back to List", "Index", new { novelVolumeId = ViewBag.NovelVolumeId })
	</div>


@section Head {
	
	@Html.Css("Admin/NovelChapter/CreateBatch.css")
	@Html.Script(StandardLibraries.Jquery)
	@Html.Script("Admin/NovelChapter/CreateBatch.js?20101014")

}